﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using ClassDAL;
using ClassModel;

namespace ClassBLL
{
    public class t_class_task_BLL
    {
        /// <summary>
        /// 插入用户排课任务
        /// </summary>
        /// <param name="task"></param>
        /// <returns></returns>
        public static int insertTask(t_class_task task)
        {
            if (task == null) throw new ArgumentException("task参数为空了!");

            return t_class_task_DAL.InsertTask(task);
        }



         /// <summary>
        /// 返回用户的排课任务列表
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageCount"></param>
        /// <returns></returns>
        public static IList<t_class_task> List(int userid, int pageIndex = 0, int pageCount = 10)
        {
            return t_class_task_DAL.List(userid, pageIndex, pageCount);
        }


         /// <summary>
        /// 删除排课任务
        /// </summary>
        /// <param name="id"></param>
        /// <param name="userid"></param>
        /// <returns></returns>
        public static int DeleteById(int id, int userid)
        {
            return t_class_task_DAL.DeleteById(id, userid);
        }


        /// <summary>
        /// 获取用户任务信息
        /// </summary>
        /// <param name="taskId"></param>
        /// <param name="userid"></param>
        /// <returns></returns>
        public static t_class_task GetTaskById(int taskid, int userid)
        {
            return t_class_task_DAL.GetTaskById(taskid, userid);
        }

    }
}
